package com.heima.wemedia.controller.v1;

import com.heima.apis.article.IArticleClient;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmNewsPageReqDto;
import com.heima.wemedia.service.WmNewsStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/statistics")
public class WmNewsStatisticsController {

    @Autowired
    private WmNewsStatisticsService wmNewsStatisticsService;

    @GetMapping("/newsDimension")
    private ResponseResult newsDimension(WmNewsPageReqDto dto) {
        return wmNewsStatisticsService.newsDimension(dto);
    }

    @GetMapping("/newsPage")
    private ResponseResult newsPage(WmNewsPageReqDto dto) {
        return wmNewsStatisticsService.newsPage(dto);
    }

    @GetMapping("/newsDetail")
    private ResponseResult newsDetail(WmNewsPageReqDto dto) {
        return wmNewsStatisticsService.newsDetail(dto);
    }
}
